package com
{
	import com.connect.agreement.mclgc.Packet;
	
	import mx.controls.Alert;
	
	import org.phprpc.util.PHPSerializer;

	public class ErrorManager
	{
		public static const NonRole:int = 1001;
		
		public static const SendPacket:int = 1002;
		
		public function ErrorManager()
		{
		}
		
		public static function update(packet:Packet):void
		{
			if(!packet){
				return;
			}
			switch(packet.cmd)
			{
				case 1:
					Alert.show('Error#'+packet.data);
					break;
				case 2:
					Alert.show(PHPSerializer.unserialize(packet.data));
					break;
			}
		}
	}
}